<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <!-- 
    属性绑定
      v-bind:
   -->
  <div id="app">
    <a :href="url">百度</a>
    <input type="button" value="切换" @click="handle">
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const vm = new Vue({
      el: "#app",
      data: {
        url: "https://baidu.com"
      },
      methods: {
        handle() {
          this.url = "http://itcast.cn";
        }
      }
    });

  </script>
</body>

</html>
